package cn.etynit.exception;

import lombok.Data;

@Data
public class GlobalException extends RuntimeException {
    private String errorCode;

    public GlobalException(){}

    public GlobalException(String message) {
        super(message);
    }

    public GlobalException(String message,String errorCode) {
        super(message);
        this.errorCode = errorCode;
    }
    public GlobalException(GlobalExceptionCodeEnum globalExceptionCodeEnum) {
        super(globalExceptionCodeEnum.getMessage());
        this.errorCode = globalExceptionCodeEnum.getCode();
    }

}
